write to stream

This block is part of the http connection group and was last modified in core v10.4.28.

write to stream v10.4.28

Writes part of a response to the client. After the whole response has been streamed, we need to call end stream.

In pins 5 + flow
  • flow
    flow
  • connection required
    httpconnection
  • code required
    number

    HTTP Status Code to return on this response.

  • type
    value

    Sets the Content-Type HTTP header.

    Default text/plain

  • Headers
    array<object>

    Custom HTTP Headers to set, Array of Objects [{ key: Value, value: Value }]

  • Chunk required
    value

    Writes part of a response to the client. After the whole response has been streamed, we need to call end stream.

Out pins 1 + flow
  • flow
    flow
  • connection
    httpconnection

A typical wiring for write to stream: a function trigger starts the flow; number feeds the code pin; the flow out pin feeds debug.

Studio canvas example for the write to stream block: typical wiring for write to stream.

Version history

Introduced in v10.4.28.


Back to http connection Return to the main group to view all sub-groups Back to response Return to the group to view all blocks within this group